﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BlueCMS.Core.Data.Query.Conditions
{
    public class ExistsNode : ConditionBase, IEndNode
    {
        public Action<SelectQuery> Query { get; set; }
        public ExistsNodeType Type { get; set; }

        public ExistsNode(ExistsNodeType type, Action<SelectQuery> query)
        {
            Type = type;
            Query = query;
        }

        IEndNode IEndNode.EndGroup()
        {
            return (IEndNode)base.EndGroup();
        }

        IStartNode IEndNode.And()
        {
            return (IStartNode)base.And();
        }

        IStartNode IEndNode.Or()
        {
            return (IStartNode)base.Or();
        }
    }
}
